
package com.Algorithm;

import com.Entity.Employee;

/**
 *
 * @author Vi
 */
public class Variant implements Comparable<Variant> {

    private Employee employee;
    private double value;

    public Employee getEmployee() {
        return employee;
    }

    public double getValue() {
        return value;
    }

    public void setEmployee(Employee employee) {
        this.employee = employee;
    }

    public void setValue(double value) {
        this.value = value;
    }

    public Variant(Employee employee, double value) {
        this.employee = employee;
        this.value = value;
    }

    public int compareTo(Variant v) {
        
        if (value > v.getValue()) {
            return -1;
        } else if (value < v.getValue()) {
            return 1;
        } else {
            return 0;
        }
    }

}
